package com.example.mall.goods.core.dao;

import com.example.mall.goods.api.entity.MallGoods;
import com.example.mall.goods.api.entity.StockNumDTO;
import com.example.mall.util.PageQueryUtil;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ShopGoodsMapper {

    int insertSelective(MallGoods record);//

    MallGoods selectByPrimaryKey(Long goodsId);//

    int updateByPrimaryKeySelective(MallGoods record);//

    List<MallGoods> findShopGoodsList(PageQueryUtil pageUtil);//

    int getTotalShopGoods(PageQueryUtil pageUtil);//

    List<MallGoods> selectByPrimaryKeys(List<Long> goodsIds);//

    List<MallGoods> findMallGoodsListBySearch(PageQueryUtil pageUtil);//

    int getTotalMallGoodsBySearch(PageQueryUtil pageUtil);//

    int batchInsert(@Param("mallGoodsList") List<MallGoods> mallGoodsList);//

    int updateStockNum(@Param("stockNumDTOS") List<StockNumDTO> stockNumDTOS);

    int batchUpdateSellStatus(@Param("orderIds") Long[] orderIds, @Param("sellStatus") int sellStatus);

}